package com.kelvin.oocl.Thread;

import javax.jms.JMSException;

import com.kelvin.oocl.bookproducer.BookProducer;

public class Task implements Runnable{
	private BookProducer producer;
	private String msg;
	
	public Task(BookProducer producer,String msg) {
		this.producer = producer;
		this.msg = msg;
	}

	public void run() {
		try {
			producer.send(msg);
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}
	
}
